package com.modlin.selenium;

import org.testng.*;
import org.testng.annotations.*;
import org.openqa.selenium.*;

/**
 * @author v.berdutin
 * 
 */

public class Login extends com.modlin.selenium.pages.TestBase {

	@Test(description = "-login with correct user and incorrect password")
	public void testLoginFail() throws Exception {
		enterLoginForm("principal@us.us", "fake");
		Assert.assertTrue(driver.findElement(By.xpath("//div[2]/span"))
				.isDisplayed());
	}

	@Test(description = "-login with correct user and correct password")
	public void testLoginOK() throws Exception {
		enterLoginForm("principal@us.us", "12345678");
		Assert.assertEquals(driver.findElement(By.xpath("//div/div[2]"))
				.getText(), "Jhon Smitt");

	}
}